<?php
/**
 * SocialEnginePro
 *
 * @category   Application_Extensions
 * @package    tv
 * @author     Azim
 */

/**
 * @category   Application_Extensions
 * @package    tv
 */
class Tv_Model_Category extends Core_Model_Item_Abstract
{
 public function getUsedCount(){
    $table  = Engine_Api::_()->getDbTable('tvs', 'tv');
    $rName = $table->info('name');
    $select = $table->select()
                    ->from($rName)
                    ->where($rName.'.category_id = ?', $this->category_id);
    $row = $table->fetchAll($select);
    $total = count($row);
    return $total;
  }
}